#!C:\\Python27\\python.exe
import sys
sys.path.append('cgi-bin')
import MSConfig; MSConfig.init('cgi-bin'); config = MSConfig.config;
 
import BaseHTTPServer
import CGIHTTPServer
import cgitb; cgitb.enable()  ## This line enables CGI error reporting
 
server = BaseHTTPServer.HTTPServer
handler = CGIHTTPServer.CGIHTTPRequestHandler
server_address = (str(config.get('cgi_server', 'host')), int(config.get('cgi_server', 'port')))
#handler.cgi_directories = [cgi_config.CGI_ROOT_DIR]

print 'starting at %s' % (str(server_address))
httpd = server(server_address, handler)
httpd.serve_forever()
